package net.optix.ip.commands
{
	import com.adobe.cairngorm.business.Responder;
	import com.adobe.cairngorm.commands.Command;
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import mx.collections.ArrayCollection;
	
	import net.optix.ip.business.*;
	import net.optix.ip.events.GetActionsEvent;
	import net.optix.ip.events.GetResponseActionsEvent;
	import net.optix.ip.model.ModelLocator;
	import net.optix.ip.vo.ActionVO;
	
	public class GetResponseActionsCommand implements Command, Responder
	{
		// attributes ============================
		private var model : ModelLocator = ModelLocator.getInstance();


		// functions ============================
		public function execute( event:CairngormEvent ) : void
		{
			var myEvent:GetResponseActionsEvent = GetResponseActionsEvent( event );
			trace(myEvent.actionID+"  response    myEvent.actionID");
			var delegate:InventionDelegate = new InventionDelegate(  );     
			delegate.getResponseActions( this , myEvent.actionID );
			
		}
		
		//----------------------------------------------------------------------------
		public function onResult( event : * = null ) : void
		{
			trace(event.result+"  get response event");
			try
			{
				model.responseActions	=	event.result;
				
				
			}
			catch(error:Error){}
		}
		
		//----------------------------------------------------------------------------
		public function onFault( event : * = null ) : void
		{
			
		}

	}
}